<!DOCTYPE html>
<html>
    <head>
        <meta charset="UTF-8">
        <title>401</title>
        <meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1">
        <link rel="stylesheet" href="layui/css/layui.css">
        <script src="layui/layui.js" type="text/javascript"></script>
        <script type="text/javascript" src="jquery/jquery-3.2.1.min.js"></script>
        <script type="text/javascript" src="echarts/echarts.min.js"></script>
    </head>
    <body>
         管理平台，用于管理用户的账号，资金等信息。
         
         <div id="main" style="width: 600px;height:400px;"></div>
         
    </body>
   
    <script type="text/javascript">
        alert(123)
        $(function(){
        	
        	$.getJSON('app/about',function(r){
        		if(r.regdata&&r.regdata.length>0){
        			var xData=[];
        			var rData=[];
        			$.each(r.regdata,function(index,value){
        				xData[index]=value.day;
        				rData[index]=value.num;
        			});
        			createCharts(xData,rData);
        		}else{
        			var xData=[];
        			var rData=[];
        		}
        	});
        	
        });
    
        
        function createCharts(xData,rData){
	        // 基于准备好的dom，初始化echarts实例
	        var myChart = echarts.init(document.getElementById('main'));
	
	        // 指定图表的配置项和数据
	        var option = {
	            title: {
	                text: '每日注册人数'
	            },
	            tooltip: {},
	            legend: {
	                data:['注册人数']
	            },
	            xAxis: {
	                //data: ["衬衫","羊毛衫","雪纺衫","裤子","高跟鞋","袜子"]
	                data:xData
	            },
	            yAxis: {},
	            series: [{
	                name: '销量',
	                type: 'bar',
	                //data: [5, 20, 36, 10, 10, 20]
	                data:rData
	            }]
	        };
	
	        // 使用刚指定的配置项和数据显示图表。
	        myChart.setOption(option);
        }
    </script>
   
</html>